package com.zq.blog_serve.service.flowable;

import org.flowable.engine.RuntimeService;
import org.flowable.engine.runtime.ProcessInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class ProcessTaskService {

    @Autowired
    RuntimeService runtimeService;

    // 发起流程
    public void startTask() {
        Map<String, Object> variables = new HashMap<String, Object>();
        variables.put("employee", "");
        variables.put("nrOfHolidays", "");
        variables.put("description", "");
        ProcessInstance processInstance =
                runtimeService.startProcessInstanceById("holidayRequest", variables);
    }

    // 我发起的流程
    public void myProcessList(){

    }
}


